var userID = ''; //Contient l'ID de l'utiliateur

var map; //Contient la map
var currentPositionMarker; //Contient le marker position de l'utilisateur actuel
var currentPositionCircle; //Contient le cercle position de l'utilisateur actuel
var watchID; //Contient l'ID de la synchronisation GPS

var sharePosition=true; //Partage de la position : Booleen
var showUsersOnMap=true; //Affichage des autres Vloveurs : Booleen

var lastPosition; //Derniere position connue

//window.localStorage.setItem('sharePosition', true);
//window.localStorage.setItem('showUsersOnMap', true);





google.maps.Map.prototype.markersStations = new Array();
google.maps.Map.prototype.markersUsers = new Array();


google.maps.Map.prototype.addMarkerStations = function(marker) {
    this.markersStations[this.markersStations.length] = marker;
    marker.setMap(map);
};
google.maps.Map.prototype.addMarkerUsers = function(marker) {
    this.markersUsers[this.markersUsers.length] = marker;
    marker.setMap(map);
};

google.maps.Map.prototype.getMarkersStations = function() {
    return this.markersStations
};
google.maps.Map.prototype.getMarkersUsers = function() {
    return this.markersUsers
};

google.maps.Map.prototype.clearMarkersStations = function() {
    for(var i=0; i<this.markersStations.length; i++){
        this.markersStations[i].setMap(null);
    }
    this.markersStations = new Array();
};
google.maps.Map.prototype.clearMarkersUsers = function() {
    for(var i=0; i<this.markersUsers.length; i++){
        this.markersUsers[i].setMap(null);
    }
    this.markersUsers = new Array();
};